* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4cc9f0;
    --secondary-color: #e52e71;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #1a1a2e;
    --darker-bg: #16213e;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --section-spacing: 20px;
    --section-padding: 20px;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 100vw;
    margin: 0 auto;
    padding: var(--section-spacing);
    display: flex;
    flex-direction: column;
    gap: var(--section-spacing);
    min-height: 100vh;
}

/* Section Styling */
section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.section-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header */
.app-header {
    text-align: center;
    padding: var(--section-padding);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
}
/* 新消息指示器样式 */
.new-message-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.new-message-indicator:hover {
    background: #3a8bc8;
    transform: translateX(-50%) scale(1.05);
}

.new-message-indicator i {
    font-size: 0.8rem;
}

/* 确保日志容器有相对定位 */
.message-log-container {
    position: relative;
    height: 200px;
}

.message-log {
    height: 100%;
    overflow-y: auto;
    padding: 15px var(--section-padding);
    display: none;
}

.message-log.active {
    display: block;
}
h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Control Section */
.control-section {
    padding: var(--section-padding);
}

.control-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.control-group input {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 14px;
}

.control-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.button-group {
    display: flex;
    gap: 8px;
}

/* Buttons */
button {
    padding: 10px 16px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    font-size: 14px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    background: #2408af;
}

.btn-primary:hover {
    background: #4c31d0;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Status Section */
.status-section {
    padding: var(--section-padding);
}

.status-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-color);
}

.status-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status-value {
    font-weight: bold;
    color: var(--primary-color);
}

/* Player Section */
.player-section {
    padding: var(--section-padding);
    min-height: 100px;
}

.multi-view-layout {
    display: grid;
    grid-template-areas: 
        "main side";
    grid-template-columns: 1fr 320px;
    grid-template-rows: 1fr auto;
    gap: 20px;
    height: auto;
}

.main-player-section {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side-players-section {
    grid-area: side;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}

.section-header h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* Player Containers */
.player-container {
    background: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.player-content {
    width: 100%;
    height: 100%;
    position: relative;
}

#dplayer {
    width: 100%;
    height: 100%;
}

/* Danmu Container */
.danmu-container {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
    /* 性能优化 */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
    contain: strict;
}

/* Side Players */
.side-players-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.side-players-container .video-player-item {
    height: calc(25% - 7.5px);
    flex: 1;
}

/* Video Player Items */
.video-player-item {
    background: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-player-header {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 10;
    color: white;
    font-size: 12px;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-player-content {
    width: 100%;
    height: 100%;
}

.video-player-controls {
    position: absolute;
    bottom: 5px;
    right: 5px;
    z-index: 10;
    opacity: 0;
    transition: var(--transition);
}

.video-player-item:hover .video-player-controls {
    opacity: 1;
}

.remove-player-btn {
    background: var(--danger-color) !important;
    border: none;
    border-radius: 4px;
    color: white;
    padding: 2px 6px;
    font-size: 12px;
    cursor: pointer;
}

/* Management Section */
.management-section {
    padding: var(--section-padding);
}

.management-panel {
    display: grid;
    grid-template-columns: 1fr; /* 默认单列布局 */
    gap: 20px;
}

/* 当任务管理可见时，使用两列布局 */
.management-panel:has(.admin-setting:not([style*="display: none"])) {
    grid-template-columns: 2fr 1fr;
}

.panel-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    padding: 15px;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-item label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Task Management */
.task-management {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-with-button {
    display: flex;
    gap: 8px;
}

.input-with-button input {
    flex: 1;
}

.task-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#task-id-list {
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 8px;
}

.log-section {
    padding: var(--section-padding); /* 添加上下左右内边距 */
}

.message-log-panel {
    background: var(--card-bg); /* 添加背景色与其他部分一致 */
    border-radius: var(--border-radius); /* 添加圆角 */
    overflow: hidden; /* 确保圆角生效 */
}
.message-log-panel {
    background: transparent;
    border-radius: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px var(--section-padding);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.message-log {
    height: 200px;
    overflow-y: auto;
    padding: 15px var(--section-padding);
}

.message {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.message-system {
    color: var(--text-secondary);
    font-style: italic;
}

.message-danmu {
    color: var(--primary-color);
}

.message-gift {
    color: var(--warning-color);
}

/* Footer */
.footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: auto;
}

.footer-info {
    display: flex;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #2d3748;
    margin: 10% auto;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: white;
}

.modal-body {
    padding: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #d1d5db;
    font-size: 16px;
    background: transparent;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #000;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 4px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Range Inputs */
input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(76, 201, 240, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 201, 240, 0.5);
}

/* Active States */
button.active {
    background: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(229, 46, 113, 0.3);
}

@media (max-width: 1024px) {
    .multi-view-layout {
        grid-template-areas: 
            "main"
            "side"
            "mini";
        grid-template-columns: 1fr;
        grid-template-rows: 400px 200px auto;
        height: auto;
    }
    
    .side-players-container {
        flex-direction: row;
        height: 180px;
    }
    
    .side-players-container .video-player-item {
        width: 240px;
        height: 100%;
    }
    
    .management-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        gap: 15px;
    }
    
    .control-panel {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .status-indicators {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .multi-view-layout {
        grid-template-rows: 300px 150px auto;
    }
    .side-players-container .video-player-item
    .footer-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    .side-players-container .video-player-item
    
    .control-grid {
        grid-template-columns: 1fr;
    }
    
    .status-indicators {
        grid-template-columns: 1fr;
    }
}

/* 弹幕区域尺寸控制 */
.danmu-fullscreen {
    width: 100% !important;
    height: 100% !important;
}

.danmu-halfscreen {
    width: 100% !important;
    height: 50% !important;
    top: 0 !important;
    bottom: auto !important;
}

.danmu-thirdscreen {
    width: 100% !important;
    height: 33.33% !important;
    top: 0 !important;
    bottom: auto !important;
}

/* 确保弹幕容器正确定位 */
.danmu-container {
    position: absolute !important;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

/* Toast 消息样式 - 居中显示 */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
    max-width: 90vw;
    width: auto;
}

.toast {
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px 24px;
    min-width: 300px;
    max-width: 500px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* 确保Toast本身也使用相同的居中定位 */
    position: relative;
    left: 0;
    top: 0;
    transform: none;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, currentColor 50%, transparent 100%);
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success-color);
}

.toast.success::before {
    background: linear-gradient(90deg, transparent 0%, var(--success-color) 50%, transparent 100%);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger-color);
}

.toast.error::before {
    background: linear-gradient(90deg, transparent 0%, var(--danger-color) 50%, transparent 100%);
}

.toast.warning {
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning-color);
}

.toast.warning::before {
    background: linear-gradient(90deg, transparent 0%, var(--warning-color) 50%, transparent 100%);
}

.toast.info {
    border-color: rgba(76, 201, 240, 0.3);
    color: var(--primary-color);
}

.toast.info::before {
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
}

.toast-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.toast-title {
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    flex: 1;
}

.toast-close {
    position: absolute;
    right: -8px;
    top: -8px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.toast-message {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
    word-break: break-word;
}

/* 图标样式 */
.toast-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--danger-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast.info .toast-icon {
    color: var(--primary-color);
}

/* 修复动画：所有动画都基于容器居中定位 */
@keyframes toastPopIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    70% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* 应用动画到Toast元素本身 */
.toast.pop-in {
    animation: toastPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.fade-out {
    animation: toastFadeOut 0.3s ease-out forwards;
}

/* 进度条动画 */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.6;
    animation: progressBar linear forwards;
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .toast {
        min-width: 280px;
        max-width: 90vw;
        padding: 16px 20px;
    }
    
    .toast-title {
        font-size: 1rem;
    }
    
    .toast-message {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .toast {
        min-width: 250px;
        padding: 14px 16px;
    }
    
    .toast-container {
        gap: 10px;
    }
}

/* 日志标签页样式 */
.log-tabs {
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    padding: 4px;
}

.log-tab {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.log-tab.active {
    background: var(--primary-color);
    color: white;
}

.log-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* 消息日志容器 */
.message-log-container {
    position: relative;
    height: 200px;
}

.message-log {
    height: 100%;
    overflow-y: auto;
    padding: 15px var(--section-padding);
    display: none;
}

.message-log.active {
    display: block;
}

/* 错误消息样式 */
.message-error {
    color: var(--danger-color);
    border-left: 3px solid var(--danger-color);
    padding-left: 10px;
    background: rgba(239, 68, 68, 0.1);
}
/* 悬浮弹幕日志样式 */
.floating-danmu-log {
    position: fixed;
    top: 50%;
    right: 20px;
    width: 400px;
    height: 500px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: none;
    flex-direction: column;
    min-width: 300px;
    min-height: 200px;
    max-width: 500vw;
    max-height: 500vh;
    resize: none; /* 禁用浏览器默认resize */
}

.floating-danmu-log.active {
    display: flex;
}

.floating-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: move;
}

.floating-log-title {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.floating-log-controls {
    display: flex;
    gap: 8px;
}

.floating-log-controls button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.floating-log-controls button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.floating-log-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* 悬浮日志中的消息样式 */
.floating-log-content .message {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* 日志悬浮按钮 */
.log-float-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    margin-left: 8px;
    transition: var(--transition);
}

.log-float-btn:hover {
    background: #3a8bc8;
    transform: translateY(-1px);
}

/* 确保原生日志容器在悬浮时隐藏 */
.message-log-container.floating .message-log.active {
    display: none;
}
/* 悬浮弹幕日志大小调整手柄 */
.floating-log-resize-handle {
    position: absolute;
    background: rgba(76, 201, 240, 0.3);
    transition: background 0.3s ease;
}

.floating-log-resize-handle:hover {
    background: rgba(76, 201, 240, 0.6);
}

.floating-log-resize-right {
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: ew-resize;
}

.floating-log-resize-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    cursor: ns-resize;
}

.floating-log-resize-bottom-right {
    right: 0;
    bottom: 0;
    width: 12px;
    height: 12px;
    cursor: nwse-resize;
    border-radius: 2px;
}

/* 悬浮日志最小化状态 */
.floating-danmu-log.minimized {
    height: 40px !important;
}

.floating-danmu-log.minimized .floating-log-content {
    display: none;
}
/* 弹幕日志样式 - 飘屏效果 */
.message-log-danmu .message {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    padding: 8px 16px;
    margin: 4px 0;
    animation: danmuSlideIn 0.3s ease-out;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.message-log-danmu .message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.1), rgba(229, 46, 113, 0.1));
    z-index: -1;
}


/* 平台标签样式 */
.message-log-danmu .platform-label {
    background: var(--platform-color, #4cc9f0);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    margin-right: 6px;
    display: inline-block;
    line-height: 1;
}

/* 备注标签样式 */
.message-log-danmu .remark-label {
    background: #1a1a2e;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    margin-right: 6px;
    display: inline-block;
    line-height: 1;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

/* 弹幕内容样式 */
.message-log-danmu .content {
    color: #ffffff;
    font-weight: 500;
}

/* 悬浮日志中的弹幕样式 */
.floating-log-content .message-danmu {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    padding: 8px 16px;
    margin: 4px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: danmuSlideIn 0.3s ease-out;
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
}

.floating-log-content .message-danmu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.1), rgba(229, 46, 113, 0.1));
    z-index: -1;
}

/* 悬浮日志中的平台标签样式 */
.floating-log-content .platform-label {
    background: var(--platform-color, #4cc9f0);
    color: white; /* 文本改为白色 */
    padding: 2px 8px;
    border-radius: 12px; /* 圆角效果 */
    font-size: 1.0em;
    font-weight: bold;
    margin-right: 6px;
    display: inline-block;
    line-height: 1;
}

/* 为不同平台设置颜色 */
.message-log-danmu .message[data-platform="douyin"] .platform-label,
.floating-log-content .message-danmu[data-platform="douyin"] {
    --platform-color: #ff0050;
}

.message-log-danmu .message[data-platform="kuaishou"] .platform-label,
.floating-log-content .message-danmu[data-platform="kuaishou"] {
    --platform-color: #ff6600;
    
}

.message-log-danmu .message[data-platform="bilibili"] .platform-label,
.floating-log-content .message-danmu[data-platform="bilibili"] {
    --platform-color: #fb7299;
}

.message-log-danmu .message[data-platform="huya"] .platform-label,
.floating-log-content .message-danmu[data-platform="huya"] {
    --platform-color: #ff9900;
}

.message-log-danmu .message[data-platform="douyu"] .platform-label,
.floating-log-content .message-danmu[data-platform="douyu"] {
    --platform-color: #ff6b00;
}

.message-log-danmu .message[data-platform="weibo"] .platform-label,
.floating-log-content .message-danmu[data-platform="weibo"] {
    --platform-color: #e6162d;
}

.message-log-danmu .message[data-platform="xiaohongshu"] .platform-label,
.floating-log-content .message-danmu[data-platform="xiaohongshu"] {
    --platform-color: #ff2741;
}

/* 消息日志滚动优化 */
.message-log-danmu {
    scroll-behavior: smooth;
    padding: 10px;
}

.message-log-danmu::-webkit-scrollbar {
    width: 6px;
}

.message-log-danmu::-webkit-scrollbar-thumb {
    background: rgba(76, 201, 240, 0.3);
    border-radius: 3px;
}

.message-log-danmu::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 201, 240, 0.5);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .message-log-danmu .message {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .message-log-danmu .platform-label,
    .message-log-danmu .remark-label {
        font-size: 0.65em;
        padding: 1px 6px;
    }
}